#include <QCoreApplication>
#include <iostream>
using namespace std;

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    int x;
    int f;
    cout<<"X: ";
    cin>>x;
    if(x<0)
    f=0;
    if(((x>=0)&&(x<1))||((x>=2)&&(x<3)))
    f=1;
    if(((x>=1)&&(x<2))||((x>=3)&&(x<4)))
    f=-1;
    cout<<"f= "<<f;
    return a.exec();
}
